//
//  AudioPlayerManage.h
//  caishuitong
//
//  Created by 企友软mac on 2017/6/8.
//  Copyright © 2017年 zhangxy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@protocol AudioPlayerManageDelegate <NSObject>

- (void)changeUIstateClicked:(AVPlayer *)player;

@end

@interface AudioPlayerManage : NSObject

@property (copy, nonatomic) NSString *currentUrl;
@property (assign, nonatomic) NSInteger currentIndex;
@property (strong, nonatomic) NSArray *arrPlayList;
@property (weak, nonatomic) id delegatePlayer;


/**
 *  是否播放完成
 */
@property (copy, nonatomic) void (^playFinishBlock)(BOOL playFinish);


/**
 *  获取时间
 */
@property (strong, nonatomic) void (^playTimeSettingBlock)(NSString *playTime);
@property (strong, nonatomic) void (^durationTimeSettingBlock)(NSString *durationTime);

+ (AudioPlayerManage *)playerManage;

+ (void)playerManageDealloc;

- (void)audioPlayerPlay;
- (void)audioPlayerPause;
- (void)audioPlayerDestroy;

- (void)audioPlayerPlayNext;
- (void)audioPlayerPlayPrevious;

- (void)audioPlayerSeekTime:(NSInteger)time;

- (void)removeObserverAndNotificationCenter;

@end
